import request from "./../utils/request.js";

/**
 * 店铺
 */

/**
 * 列表
 * @param object data
 */
export function getShopList(data) {
  return request.get('shop/index', data || {});
}

/**
 * 园区
 * @param data
 * @returns {*}
 */
export function getParkList(data) {
  return request.get('shop/park_list', data || {});
}

export function getShopSearchList(data) {
  return request.get('shop/search', data || {});
}

/**
 * 商家端统计
 * @param data
 */
export function getShopConsoleStat(data) {
  return request.get('console/shop/stat', data || {});
}


/**
 * 详情
 * @param object data
 */
export function getShopDetail(id = 0, data) {
  return request.get('shop/detail/' + id, data || {});
}

//店铺登录
export function login(data) {
  return request.post('console/shop/login', data);
}

//店铺订单
export function getShopOrderList(data) {
  return request.get('console/shop/order_list', data || {});
}


//店铺初始化数据
export function printerInitData(data) {
  return request.post('console/shop/printer_init_data', data || {});
}

//店铺打印
export function shopPrinter(data) {
  return request.post('console/shop/printer', data || {});
}


//店铺接单
export function acceptOrder(data) {
  return request.post('console/shop/accept', data || {});
}

//店铺确认已出餐
export function confirmDeliverOrder(data) {
  return request.post('console/shop/confirm', data || {});
}



